The Smalltalk program language processing system is constituted by a virtual image and a virtual machine, as shown in FIG. 7. The virtual image is code in which data, programs, executive contexts, and the like are expressed as objects, and is formed by compiling and running a program written in Smalltalk language. The virtual machine, on the other hand, is a section which interprets the instructions of the virtual image and instructs a computer (CPU) to operate on the data of the virtual image.
The virtual image includes development environments and objects needed for executing other application programs, and consequently, the virtual image may become too large. Even when only a specific application program is executed, the start time is long because the entire virtual image is constituted. Also, since the virtual image requires a large part of the memory, the locality of the program is poor and cache misses and pagings are frequently caused.
To cope with these problems, there has been proposed a method in which objects necessary for a specific application are extracted and stored, and the objects are utilized as a virtual image. For example, there is the stripper of Visual Works (ParcPlace Systems), the library builder of Visual Smalltalk (Digitalk), and the minimum image generation function of VisualAge (IBM). When a virtual image for a specific application is extracted in advance, the following disadvantages occur: (1) since the automatic analysis of a meta program such as the program with a method object taking a message as an argument is impossible, human interaction is indispensable to the extraction of the image, and consequently, there is the possibility that mistakes are caused; (2) the object-oriented language has the nature that parts of a program to be executed are unpredictable in advance and in fact a large part of the program has to be included in the virtual image, so the virtual image cannot be made dramatically small; and (3) since the whole image needed for executing an application program is read into the main memory when the program is started, the start time is lengthy.
In another method, necessary objects are not loaded into a main memory until they become necessary (for example, Ted Kaehler and Glenn Krasner, "LOOM-Large Object-Oriented Memory for Smalltalk-80 System, Smalltalk-80 Bits of History Words of Advice," Addison-Wesley, 1983). The system disclosed therein is a method obliged to be taken because the capacity of a main memory is physically small, but it is necessary to execute a large-scale application. Also, when access to an object occurs, main memory is checked every time to see if the object exists thereon; thus, there is the disadvantage that the residency check is heavy. Furthermore, there is Antony L. Hosking and J. Eliot B. Moss, "Object Fault Handling for Persistent Programming Languages: A performance Evaluation, Proceedings of Object Oriented Programming Systems and Languages," ACM 1993." This method loads a Smalltalk object into main memory when it is needed. Even in this case, the method of loading objects is the same as that disclosed in the aforementioned publication.
Moreover, IBM TDB vol. 37, No. 2A, pp. 257-260, February 1994, discloses that a method using dynamic link library (DLL) is used in the Smalltalk system. This method is also constructed so that objects are linked at the time of execution, but since a target object has to be extracted from a virtual image in advance, this method is the same as the aforementioned conventional examples and therefore has the following disadvantages: (1) the extracting operation is complicated; (2) objects are loaded in units of class and, therefore, the virtual image cannot be made small; and (3) since at least the entire symbol table needs to be loaded in when linking is performed, it takes time.
Thus, a wide variety of methods have been employed in order to make the virtual image small. None of the known methods can make the image sufficiently smaller and the load thus caused is too great.
Accordingly, an objective of the present invention is to reduce the number of objects which are loaded into a main memory without requiring users to perform any operation. Another objective is to reduce the amount of use of the main memory and improve the locality of a program. Still another objective is that the start of a program can be performed at high speeds. A further objective is to minimize a reduction in operational performance caused by loading objects.